package ${packageName}.${moduleName}.domain;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
<#list list as item>
<#if item.columnName == "addTime">
import java.util.Date;
</#if>
</#list>

/**
 * ${functionName}实体
 * TODO
 * @author ${classAuthor}
 * @version 2.0
 * @since ${classDate}
 */
@Entity
@Table(name = "${tableName}")
public class ${ClassName} implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	<#list list as item>
    /**
     * ${item.columnComment}
     */
    <#if item.columnName == "id">
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private long ${item.columnName};
    <#else>
    private ${item.dataType} ${item.columnName};
    </#if>
    </#list>
    
    <#list list as item>
    /**
     * 获取${item.columnComment}
     * 
     * @return ${item.columnComment}
     */
     <#if item.columnName == "id">
	    public long get${item.columnNameUpper}(){
	        return ${item.columnName};
	    }
	<#else>
		public ${item.dataType} get${item.columnNameUpper}(){
	        return ${item.columnName};
	    }
	</#if>
	
    /**
     * 设置${item.columnComment}
     * 
     * @param ${item.columnName} 要设置的${item.columnComment}
     */
    <#if item.columnName = "id">
	    public void set${item.columnNameUpper}(long ${item.columnName}){
	        this.${item.columnName} = ${item.columnName};
	    }
    <#else>
    	public void set${item.columnNameUpper}(${item.dataType} ${item.columnName}){
	        this.${item.columnName} = ${item.columnName};
	    }
    </#if>
    </#list>
}


